from app.exts import db
from app.models.po.base_po import BasePO

class LuGangIntegrationPO(db.Model, BasePO):
    __tablename__ = "lugang_integration"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    create_time = db.Column(db.DateTime())
    date_time = db.Column(db.DateTime())
    heart_actual_long = db.Column(db.FLOAT())
    heart_predict_long = db.Column(db.FLOAT())
    heart_actual_short = db.Column(db.FLOAT())
    heart_predict_short = db.Column(db.FLOAT())






if __name__ == '__main__':
    # 创建数据表
    from sqlalchemy import create_engine, Integer, String, Float
    from sqlalchemy.orm import sessionmaker
    from sqlalchemy.ext.declarative import declarative_base
    from sqlalchemy import Column
    engine = create_engine("mysql+pymysql://root:Luck158,@10.8.0.2:3306/hblg?charset=utf8")
    Session = sessionmaker(bind=engine)
    LuGangIntegrationPO.metadata.create_all(engine)


